package com.jiangnan.filter;

import com.jiangnan.utils.SwingUtils;

import javax.swing.filechooser.FileFilter;
import java.io.File;

public class PcapFileFilter extends FileFilter {
    @Override
    public boolean accept(File file) {

        if (file.isDirectory()) {
            return true;
        }else {
            return SwingUtils.isPcapFile(file);
        }
    }


    @Override
    public String getDescription() {
        return "pcap file (*.pcap)";
    }
}
